package com.fengye.algorithms.leecode;

/**
 * @Author fengye
 * @Date 2023/4/10 9:42
 **/
public class CountOdds1523 {
    public int countOdds(int low, int high) {
        int t= high - low;
        int hf = high % 2;
        int lf = low % 2;

        if(hf == 0 && lf == 0) {
            return t/2;
        } else {
            return t/2 + 1;
        }
    }
}
